Skip to content

Support geojson with altitude - #140

Closed
ninok wants to merge 1 commit into
mapbox:mainfrom
heremaps:geojson-altitude
Closed

Support geojson with altitude#140
ninok wants to merge 1 commit into
mapbox:mainfrom
heremaps:geojson-altitude

Conversation

@ninok

@ninok ninok commented Nov 15, 2019

Copy link
Copy Markdown

According to geojson spec the coordinates of a feature can have 3 dimensions.
Before this change the 3rd component of the geometry was misused to store the simplification values of the Douglas-Peucker algorithm.
With this change the simplification values are stored in a separate array(sqDist) and the 3rd component of the coordinate remains untouched.

Signed-off-by: Nino Kettlitz 1396039+ninok@users.noreply.github.com

According to geojson spec the coordinates of a feature can have 3 dimensions.
Before this change the 3rd component of the geometry was misused to store the simplification values of the Douglas-Peucker algorithm.
With this change the simplification values are stored in a separate array(sqDist) and the 3rd component of the coordinate remains untouched.

Signed-off-by: Nino Kettlitz <1396039+ninok@users.noreply.github.com>
@asheemmamoowala
asheemmamoowala changed the base branch from master to main June 19, 2020 17:35
@mourner

mourner commented Sep 8, 2026

Copy link
Copy Markdown
Member

Sorry for not responding back then. Closing this as stale — 1) I hesitated because I don't want to add a bunch of code to support a feature that's not in the GeoJSON spec — too hacky while adding real overhead; 2) The codebase has moved a lot since then anyway, so this can't land as is.

@mourner mourner closed this Sep 8, 2026
@ninok

ninok commented Sep 9, 2026

Copy link
Copy Markdown
Author

@mourner Thanks for responding. Totally forgot about this PR 😅
Since I don't really need this right now it's fine for me to close it.

One comment regarding "a feature that's not in the GeoJSON spec". The [spec]https://datatracker.ietf.org/doc/html/rfc7946) sais:

A position is an array of numbers. There MUST be two or more
elements. The first two elements are longitude and latitude, or
easting and northing, precisely in that order and using decimal
numbers. Altitude or elevation MAY be included as an optional third
element.

but point 2, that the codebase has moved a lot, makes this PR obsolete anyways and a new one is quickly created with AI nowadays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants